package com.a3dweijing.wetouch2.datainterface;


import android.util.Log;


import com.a3dweijing.wetouch2.R;
import com.a3dweijing.wetouch2.base.App;

import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Yxd on 2015/12/28.
 */
public class Getdataimpl implements Getdata {

    String ip = App.getmContext().getString(R.string.remote_host);

    @Override
    public String remotUserRegistersMsg(String phonenumber) {
        String uri = ip+ "/user/registrationFirst";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("mobiles", phonenumber));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotUserRegistersMsg:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotUserRegistersMsg:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetCheckCode(String phonenumber) {
        String uri = ip+ "/user/forgetPasswordFirst";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("mobiles", phonenumber));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetCheckCode:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetCheckCode:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotRegisters(String phonenumber, String password,String remotRegisters) {
        String uri = ip+ "/user/registrationSecond";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_telnum", phonenumber));
            pairs.add(new BasicNameValuePair("user_password", password));
            pairs.add(new BasicNameValuePair("user_referralcode", remotRegisters));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotRegisters:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotRegisters():", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotUserLogin(String phonenumber, String password) {
        String uri = ip
                + "/user/login";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_telnum", phonenumber));
            pairs.add(new BasicNameValuePair("user_password", password));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotUserLogin:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotUserLogin():", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotFixPassword(String phonenumber, String password) {
        String uri = ip
                + "/user/forgetPasswordSecond";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_telnum", phonenumber));
            pairs.add(new BasicNameValuePair("user_password", password));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotFixPassword:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotFixPassword():", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotFixNickName(String user_id, String user_name) {
        String uri = ip
                + "/user/updateUser";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_id", user_id));
            pairs.add(new BasicNameValuePair("user_name", user_name));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotFixNickName:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotFixNickName():", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetFollowData(String userid, String page) {
        String uri = ip
                + "/home/Attation";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("pageNo", page));
            pairs.add(new BasicNameValuePair("user_id", userid));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetFollowData:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetFollowData:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetRecommentData(String page) {
        String uri = ip
                + "/home/Recommend";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("page", page));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetRecommentData:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetRecommentData:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetPartitionData() {
        String uri = ip
                + "/partition/partition";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetPartitionData:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetPartitionData:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public synchronized String remotGetPartitionType(String typeid, String page) {
        String uri = ip
                + "/partition/partitionInfo";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("partitionType", typeid));
            pairs.add(new BasicNameValuePair("pageNo",page));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetPartitionType:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetPartitionType:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetNearByData(String lon, String lat) {
        String uri = ip
                + "/home/PeopleNearby";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("Longitude", lon));
            pairs.add(new BasicNameValuePair("Latitude",lat));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetNearByData:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remorGetNearByData:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetMyFollow(String user_id) {
        String uri = ip
                + "/Personage/MyFriends";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("Wt_user_id_Friends", user_id));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetMyFollow:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetMyFollow:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetMyFans(String user_id) {
        String uri = ip
                + "/Personage/MyFans";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("Friend_id_friends", user_id));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);

            Log.e("remotGetMyFans:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetMyFans:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetMyDemand(String user_id) {
        String uri = ip
                + "/base/findDemandByUserId";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_id", user_id));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);

            Log.e("remotGetMyDemand:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetMyDemand:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotPushMyDemand(String user_id, String contentmsg) {
        String uri = ip
                + "/base/Demand";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("three_d_demand_user_id", user_id));
            pairs.add(new BasicNameValuePair("three_d_demand_contend", contentmsg));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);

            Log.e("remotPushMyDemand:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotPushMyDemand:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetMyVideo(String user_id, String pageNo) {
        String uri = ip
                + "/user/MyVideo";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_id", user_id));
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetMyVideo:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetMyVideo:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetMyLikeVideo(String user_id, String pageNo) {
        String uri = ip
                + "/user/MyCollectVideo";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_id", user_id));
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetMyLikeVideo:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetMyLikeVideo:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetSpecial(String pageNo) {
        String uri = ip
                + "/threeD/commonVideo";
//        String uri = "http://192.168.2.122/wc"
//                + "/threeD/commonVideo";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetSpecial:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetSpecial:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetSpecialList(String specialid, String pageNo) {
        String uri = ip
                + "/threeD/zoneInfo";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("zoneInfoId", specialid));
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetSpecialList:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetSpecialList:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetOriginalData(String pageNo, String originalityType) {
        String uri = ip
                + "/threeD/originality";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("originalityType", originalityType));
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetOriginalData:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetOriginalData:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetImageData(String pageNo, String picturetype) {
        String uri = ip
                + "/threeD/picture";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("pictureType", picturetype));
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetImageData:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetImageData:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetBusinessData(String pageNo) {
        String uri = ip
                + "/threeD/business";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetBusinessData:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetBusinessData:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetOtherMessage(String userid, String wt_user_id_Friends) {
        String uri = ip
                + "/user/findpersonaluser";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("user_id", userid));
            pairs.add(new BasicNameValuePair("wt_user_id_Friends", wt_user_id_Friends));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetOtherMessage:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetOtherMessage:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetOtherMessage2(String uid) {
        String uri = ip
                + "/user/findUserAttention";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("uid", uid));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetOtherMessage2:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetOtherMessage2:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String search(String uid, String sc, String st, String pageNo) {
        String uri = ip
                + "/base/search";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("uid", uid));
            pairs.add(new BasicNameValuePair("sc", sc));
            pairs.add(new BasicNameValuePair("st", st));
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetOtherMessage2:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetOtherMessage2:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetTVBanner() {
        String uri = ip
                + "/threeD/findvideoShowImg";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetTVBanner:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetTVBanner:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetTVVideo(String pageNo) {
        String uri = ip
                + "/threeD/threedVideo";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetTVVideo:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetTVVideo:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotGetTVVideoHot(String pageNo) {
        String uri = ip
                + "/threeD/threedVideoHot";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetTVVideoHot:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetTVVideoHot:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remoteGetSTS() {
        String uri ="http://wetouch.3dweijing.com/alySts/stsGet";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remoteGetSTS:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remoteGetSTS:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remoteuploud(String userid, String videoname, String videourl, String imageurl, String typeid) {
        String uri = ip
                + "/videoUpload/upload";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("originalvid_user_id", userid));
            pairs.add(new BasicNameValuePair("originalvideo_name", videoname));
            pairs.add(new BasicNameValuePair("originalvideo_describe", videoname));
            pairs.add(new BasicNameValuePair("originalvideo_url", videourl));
            pairs.add(new BasicNameValuePair("originalvideo_show_img", imageurl));
            pairs.add(new BasicNameValuePair("originalvideo_type_id", typeid));
            pairs.add(new BasicNameValuePair("originalvideo_video_time", "1"));
            pairs.add(new BasicNameValuePair("originalvideo_is_three_d", "2"));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotGetTVVideoHot:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotGetTVVideoHot:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remoteGetReport(String tel) {
        String uri = ip
                + "/angaHtm/findAnga";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("tel", tel));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remoteGetReport:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remoteGetReport:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remoteLikeoriginalVideo(String userid, String videoid) {
        String uri = ip
                + "/base/videoLike";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("likeType", "1"));
            pairs.add(new BasicNameValuePair("uid", userid));
            pairs.add(new BasicNameValuePair("vid", videoid));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("LikeoriginalVideo:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("LikeoriginalVideo:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remoteGetLikeStatus(String userid, String videoid) {
        String uri = ip
                + "/base/pariseState";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("uid", userid));
            pairs.add(new BasicNameValuePair("vid", videoid));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remoteGetLikeStatus:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remoteGetLikeStatus:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remoteGetDiscuss(String pageNo, String vt, String vid, String did) {
        String uri = ip
                + "/base/findDiscuss";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("pageNo", pageNo));
            pairs.add(new BasicNameValuePair("vt", vt));
            pairs.add(new BasicNameValuePair("vid", vid));
            pairs.add(new BasicNameValuePair("did", did));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remoteGetDiscuss:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remoteGetDiscuss:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remoteSetDisCuss(String vt, String dt, String vid, String uid, String did, String content) {
        String uri = ip
                + "/base/addDiscuss";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("vt", vt));
            pairs.add(new BasicNameValuePair("dt", dt));
            pairs.add(new BasicNameValuePair("vid", vid));
            pairs.add(new BasicNameValuePair("uid", uid));
            pairs.add(new BasicNameValuePair("did", did));
            pairs.add(new BasicNameValuePair("content", content));
            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remoteSetDisCuss:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remoteSetDisCuss:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }

    @Override
    public String remotefollowUser(String myid, String userid) {
        String uri = ip
                + "/user/insertFriends";
//        String uri = "http://192.168.2.138/wc"
//                + "/user/insertFriends";
        HttpPost post = new HttpPost(uri);
        String responseString = null;
        try {
            // 先将参数放入List，再对参数进行URL编码
            List<NameValuePair> pairs = new ArrayList<NameValuePair>();
            pairs.add(new BasicNameValuePair("Wt_user_id_Friends",myid ));
            pairs.add(new BasicNameValuePair("friend_id_friends",userid ));

            // 设置字符集
            post.setEntity(new UrlEncodedFormEntity(pairs, HTTP.UTF_8));
            // 发起post请求 取得HttpResponse
            HttpResponse response = new DefaultHttpClient().execute(post);
            Log.e("remotefollowUser:",response.getStatusLine().getStatusCode()+"");
            if (response.getStatusLine().getStatusCode() == 200) {
                try {
                    // 获取服务器响应内容 取得返回的字符串
                    responseString = EntityUtils.toString(response.getEntity());
                    Log.e("remotefollowUser:", responseString);
                } catch (IOException e) {
                    responseString = false + "io";
                }
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
            responseString = false + "ue";
        } catch (ClientProtocolException e) {
            e.printStackTrace();
            responseString = false + "cp";
        } catch (IOException e) {
            e.printStackTrace();
            responseString = false + "io";
        }
        return responseString;
    }
}